﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DokterAfspraken
{
    public partial class PatientDokterafspraken : System.Web.UI.MasterPage
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            //LoginFactory myLoginFactory = new LoginFactory();
            //if (myLoginFactory.CheckLogin() == true)
            //{
            //    logoutPH.Visible = true;
            //    loginPH.Visible = false;
            //}
            //else
            //{
            //    logoutPH.Visible = false;
            //    loginPH.Visible = true;
            //}
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            //LoginFactory myLoginFactory = new LoginFactory();
            //if (myLoginFactory.CheckLogin() == true)
            //{
            //    logoutPH.Visible = true;
            //    loginPH.Visible = false;
            //}
            //else
            //{
            //    logoutPH.Visible = false;
            //    loginPH.Visible = true;
            //}
        }

        protected void btnAfmelden2_Click(object sender, EventArgs e)
        {
            LoginFactory myLoginFactory = new LoginFactory();
            myLoginFactory.LogOut();
            System.Web.HttpContext.Current.Response.Redirect("../PatientPages/ExterneSite.aspx");
        }

        protected void btn_AanmeldenPatient_Click(object sender, EventArgs e)
        {
            int ID = int.Parse(Request.QueryString["ID"]);
            int PraktijkID = int.Parse(Request.QueryString["PID"]);
            System.Web.HttpContext.Current.Response.Redirect("../PatientPages/PatientLogin.aspx?ID=" + ID + "&PraktijkID=" + PraktijkID);

        }
    }
}